<html>
<head>

	<script type="text/javascript" src="soapclient.js"></script>
	<script type="text/javascript">
	
	var url = "http://www.jeegoon.com/jeegoonsvc.php";
	
        function setmember()
        {
                var pl = new SOAPClientParameters();
		var usr = new Object();
		//usr.ID =  document.getElementById('postno').value;
		usr.Name =  document.getElementById('postno').value;
		usr.Email = "seraphjiang@gmail.com";
		usr.Password = "000000";
	
                pl.add("User", usr);
		pl.add("Action",1);
                SOAPClient.invoke(url,"SetMember",pl,false,setmember_callBack);
		getmaxno();

        }	
	function setmember_callBack(r)
	{

                //SOAPClient.invoke(url,"SetMember",pl,false,setmember_callBack);
	
		alert(r["ID"]+' is created.');
		//document.write(r["ID"]);
	}

	function getmember()
	{
                var pl = new SOAPClientParameters();
                var usr = new Object();
                usr.ID =  document.getElementById('postno1').value;
                usr.Status = -1;

                pl.add("UserID", document.getElementById('postno1').value);
                SOAPClient.invoke(url,"GetMemberByID",pl,true,getmember_callBack);

	}
        function getmember_callBack(r)
        {

                //SOAPClient.invoke(url,"SetMember",pl,false,getmember_callBack);

	        //alert(r.IDI+' is created.');
                //document.write(r["ID"]);
		//document.getElementById('userid').value = r["ID"];
		document.getElementById('username').value = r["Name"];
		document.getElementById('userstatus').value = r["Password"];
		document.getElementById('vendor').value = r["Email"];
        }
	function getmaxno()
	{
                var pl = new SOAPClientParameters();
		pl.add("Param","Max");
                SOAPClient.invoke(url,"GetMaxNO",pl,true,getmaxno_callBack);

	}
	function getmaxno_callBack(r)
	{
		document.getElementById('postno').value = r;
	}

	</script>
</head>

<body onLoad='javascript:getmaxno();'>

	<br>
	<h2>Add Member Number</h2>
        <input type="text" id="postno" name="Member Number" value="1301" />
        <input type="button" value="add member" onclick="setmember();" />
	<br>
	<hr>
	<br>
	<h2>Find Member By Number</h2>
	<input type=text id="postno1" name="Member Number" value="1" />
	<input type="button" value="Find member" onclick="getmember();" />
	<br><input type=text id="username" name="username" value="" />
	<br><input type=text id="userstatus" name="userstatus" value="" />
	<br><input type=text id="vendor" name="vendor" value="" />

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1167541-1";
urchinTracker();
</script>
</body>
</html>

